home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / gnulib / rcs4 / doc / rcsintro.man < prev    next >
Encoding:
Text File  |  1990-08-18  |  10.0 KB  |  331 lines

  1.  
  2.  
  3.  
  4.      RCSINTRO(1L)    Purdue University (May 11,    1983)      RCSINTRO(1L)
  5.  
  6.  
  7.  
  8.      NAME
  9.       rcsintro - introduction to RCS commands
  10.  
  11.      DESCRIPTION
  12.       The Revision Control System (RCS) manages multiple revisions
  13.       of text files.  RCS automates    the storing, retrieval,
  14.       logging, identification, and merging of revisions. RCS is
  15.       useful for text that is revised frequently, for example
  16.       programs, documentation, graphics, papers, form letters,
  17.       etc.
  18.  
  19.       The basic user interface is extremely    simple.    The novice
  20.       only needs to    learn two commands: ci(1L) and co(1L).    Ci,
  21.       short    for "check in",    deposits the contents of a text    file
  22.       into an archival file    called an RCS file. An RCS file
  23.       contains all revisions of a particular text file.  Co, short
  24.       for "check out", retrieves revisions from an RCS file.
  25.  
  26.       Functions of RCS
  27.  
  28.       +    Storage and retrieval of    multiple revisions of text.
  29.            RCS saves all old revisions in a    space efficient    way.
  30.            Changes no longer destroy the original, because the
  31.            previous    revisions remain accessible. Revisions can be
  32.            retrieved according to ranges of    revision numbers,
  33.            symbolic    names, dates, authors, and states.
  34.  
  35.       +    Maintenance of a    complete history of changes. RCS logs
  36.            all changes automatically.  Besides the text of each
  37.            revision, RCS stores the    author,    the date and time of
  38.            check-in, and a log message summarizing the change.
  39.            The logging makes it easy to find out what happened to
  40.            a module, without having    to compare source listings or
  41.            having to track down colleagues.
  42.  
  43.       +    Resolution of access conflicts. When two    or more
  44.            programmers wish    to modify the same revision, RCS
  45.            alerts the programmers and prevents one modification
  46.            from corrupting the other.
  47.  
  48.       +    Maintenance of a    tree of    Revisions. RCS can maintain
  49.            separate    lines of development for each module. It
  50.            stores a    tree structure that represents the ancestral
  51.            relationships among revisions.
  52.  
  53.       +    Merging of revisions and    resolution of conflicts.  Two
  54.            separate    lines of development of    a module can be
  55.            coalesced by merging.  If the revisions to be merged
  56.            affect the same sections    of code, RCS alerts the    user
  57.            about the overlapping changes.
  58.  
  59.       +    Release and configuration control. Revisions can    be
  60.  
  61.  
  62.  
  63.      Page 1                         (printed 8/18/90)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      RCSINTRO(1L)    Purdue University (May 11,    1983)      RCSINTRO(1L)
  71.  
  72.  
  73.  
  74.            assigned    symbolic names and marked as released, stable,
  75.            experimental, etc.  With    these facilities,
  76.            configurations of modules can be    described simply and
  77.            directly.
  78.  
  79.       +    Automatic identification    of each    revision with name,
  80.            revision    number,    creation time, author, etc.  The
  81.            identification is like a    stamp that can be embedded at
  82.            an appropriate place in the text    of a revision.    The
  83.            identification makes it simple to determine which
  84.            revisions of which modules make up a given
  85.            configuration.
  86.  
  87.       +    Minimization of secondary storage. RCS needs little
  88.            extra space for the revisions (only the differences).
  89.            If intermediate revisions are deleted, the
  90.            corresponding deltas are    compressed accordingly.
  91.  
  92.  
  93.       Getting Started with RCS
  94.  
  95.       Suppose you have a file f.c that you wish to put under
  96.       control of RCS. Invoke the check-in command
  97.  
  98.             ci    f.c
  99.  
  100.       This command creates the RCS file f.c,v, stores f.c into it
  101.       as revision 1.1, and deletes f.c.  It    also asks you for a
  102.       description. The description should be a synopsis of the
  103.       contents of the file.    All later check-in commands will ask
  104.       you for a log    entry, which should summarize the changes that
  105.       you made.
  106.  
  107.       Files    ending in ,v are called    RCS files (`v' stands for
  108.       `versions'), the others are called working files.  To    get
  109.       back the working file    f.c in the previous example, use the
  110.       check-out command
  111.  
  112.             co    f.c
  113.  
  114.       This command extracts    the latest revision from f.c,v and
  115.       writes it into f.c. You can now edit f.c and check it    back
  116.       in by    invoking
  117.  
  118.             ci    f.c
  119.  
  120.       Ci increments    the revision number properly. If ci complains
  121.       with the message
  122.  
  123.             ci error: no lock set by <your login>
  124.  
  125.       then your system administrator has decided to    create all RCS
  126.  
  127.  
  128.  
  129.      Page 2                         (printed 8/18/90)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      RCSINTRO(1L)    Purdue University (May 11,    1983)      RCSINTRO(1L)
  137.  
  138.  
  139.  
  140.       files    with the locking attribute set to `strict'. In this
  141.       case,    you should have    locked the revision during the
  142.       previous check-out. Your last    check-out should have been
  143.  
  144.             co    -l  f.c
  145.  
  146.       Of course, it    is too late now    to do the check-out with
  147.       locking, because you probably    modified f.c already, and a
  148.       second check-out would overwrite your    modifications.
  149.       Instead, invoke
  150.  
  151.             rcs     -l  f.c
  152.  
  153.       This command will lock the latest revision for you, unless
  154.       somebody else    got ahead of you already. In this case,    you'll
  155.       have to negotiate with that person.
  156.  
  157.       Locking assures that you, and    only you, can check in the
  158.       next update, and avoids nasty    problems if several people
  159.       work on the same file.  Even if a revision is    locked,    it can
  160.       still    be checked out for reading, compiling, etc. All    that
  161.       locking prevents is a    CHECK-IN by anybody but    the locker.
  162.  
  163.       If your RCS file is private, i.e., if    you are    the only
  164.       person who is    going to deposit revisions into    it, strict
  165.       locking is not needed    and you    can turn it off.  If strict
  166.       locking is turned off, the owner of the RCS file need    not
  167.       have a lock for check-in; all    others still do. Turning
  168.       strict locking off and on is done with the commands
  169.  
  170.             rcs     -U  f.c     and     rcs  -L  f.c
  171.  
  172.       If you don't want to clutter your working directory with RCS
  173.       files, create    a subdirectory called RCS in your working
  174.       directory, and move all your RCS files there.    RCS commands
  175.       will look first into that directory to find needed files.
  176.       All the commands discussed above will    still work, without
  177.       any modification. (Actually, pairs of    RCS and    working    files
  178.       can be specified in 3    ways: (a) both are given, (b) only the
  179.       working file is given, (c) only the RCS file is given. Both
  180.       RCS and working files    may have arbitrary path    prefixes; RCS
  181.       commands pair    them up    intelligently).
  182.  
  183.       To avoid the deletion    of the working file during check-in
  184.       (in case you want to continue    editing), invoke
  185.  
  186.             ci    -l  f.c        or       ci  -u  f.c
  187.  
  188.       These    commands check in f.c as usual,    but perform an
  189.       implicit check-out. The first    form also locks    the checked in
  190.       revision, the    second one doesn't. Thus, these    options    save
  191.       you one check-out operation.    The first form is useful if
  192.  
  193.  
  194.  
  195.      Page 3                         (printed 8/18/90)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      RCSINTRO(1L)    Purdue University (May 11,    1983)      RCSINTRO(1L)
  203.  
  204.  
  205.  
  206.       locking is strict, the second    one if not strict.  Both
  207.       update the identification markers in your working file (see
  208.       below).
  209.  
  210.       You can give ci the number you want assigned to a checked in
  211.       revision. Assume all your revisions were numbered 1.1, 1.2,
  212.       1.3, etc., and you would like    to start release 2.  The
  213.       command
  214.  
  215.             ci    -r2  f.c     or        ci    -r2.1  f.c
  216.  
  217.       assigns the number 2.1 to the    new revision.  From then on,
  218.       ci will number the subsequent    revisions with 2.2, 2.3, etc.
  219.       The corresponding co commands
  220.  
  221.             co    -r2  f.c     and     co     -r2.1    f.c
  222.  
  223.       retrieve the latest revision numbered    2.x and    the revision
  224.       2.1, respectively. Co    without    a revision number selects the
  225.       latest revision on the "trunk", i.e.,    the highest revision
  226.       with a number    consisting of 2    fields.    Numbers    with more than
  227.       2 fields are needed for branches.  For example, to start a
  228.       branch at revision 1.3, invoke
  229.  
  230.             ci    -r1.3.1     f.c
  231.  
  232.       This command starts a    branch numbered    1 at revision 1.3, and
  233.       assigns the number 1.3.1.1 to    the new    revision. For more
  234.       information about branches, see rcsfile(5L).
  235.  
  236.  
  237.       Automatic Identification
  238.  
  239.       RCS can put special strings for identification into your
  240.       source and object code. To obtain such identification, place
  241.       the marker
  242.  
  243.             $Header$
  244.  
  245.       into your text, for instance inside a    comment.  RCS will
  246.       replace this marker with a string of the form
  247.  
  248.             $Header:  filename    revision_number     date  time
  249.       author  state    $
  250.  
  251.       With such a marker on    the first page of each module, you can
  252.       always see with which    revision you are working.  RCS keeps
  253.       the markers up to date automatically.     To propagate the
  254.       markers into your object code, simply    put them into literal
  255.       character strings. In    C, this    is done    as follows:
  256.  
  257.             static char    rcsid[]    = "$Header$";
  258.  
  259.  
  260.  
  261.      Page 4                         (printed 8/18/90)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      RCSINTRO(1L)    Purdue University (May 11,    1983)      RCSINTRO(1L)
  269.  
  270.  
  271.  
  272.       The command ident extracts such markers from any file, even
  273.       object code and dumps.  Thus,    ident lets you find out    which
  274.       revisions of which modules were used in a given program.
  275.  
  276.       You may also find it useful to put the marker    $Log$ into
  277.       your text, inside a comment. This marker accumulates the log
  278.       messages that    are requested during check-in.    Thus, you can
  279.       maintain the complete    history    of your    file directly inside
  280.       it.  There are several additional identification markers;
  281.       see co(1L) for details.
  282.  
  283.      IDENTIFICATION
  284.       Author: Walter F. Tichy, Purdue University, West Lafayette,
  285.       IN, 47907.
  286.       Revision Number: 1.2 ; Release Date: 89/05/02    .
  287.       Copyright c 1982, 1988, 1989 by Walter F. Tichy.
  288.  
  289.      SEE ALSO
  290.       ci(1L), co(1L), ident(1L), merge(1L),    rcs(1L), rcsdiff(1L),
  291.       rcsmerge(1L),    rlog(1L), rcsfile(5L),
  292.       Walter F. Tichy, "Design, Implementation, and    Evaluation of
  293.       a Revision Control System," in Proceedings of    the 6th
  294.       International    Conference on Software Engineering, IEEE,
  295.       Tokyo, Sept. 1982.
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                         (printed 8/18/90)
  328.  
  329.  
  330.  
  331.